package com.jw.qme.controller;

import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.stp.StpUtil;
import cn.dev33.satoken.util.SaResult;
import com.jw.qme.domain.dto.MessageDTO;
import com.jw.qme.domain.po.Message;
import com.jw.qme.service.MessageService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;

/**
 * ClassName: com.jw.qme.controller
 * Datetime: 2025/4/6 下午9:02
 * Description:
 *
 * @author 汪佳泉
 * @version 1.0
 * @since 1.0
 */
@RestController
@RequiredArgsConstructor
public class MessageController {

    private final MessageService messageService;

    @GetMapping("/message")
    public SaResult getMessage(@RequestBody MessageDTO messageDTO){
        return SaResult.data(messageService.getMessageByUsername(messageDTO));
    }

}
